package com.hzdesk.media.koreabatchmatvector.bean;

import com.hzdesk.media.koreabatchmatvector.R;
import com.hzdesk.media.koreabatchmatvector.config.AppConfig;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;
import com.thoughtworks.xstream.io.xml.PrettyPrintWriter;

import java.io.Serializable;

/**
 * function :
 *
 * @author Mr.Lee
 */
@XStreamAlias("User")
public class UserBean implements Serializable {

    private static final long serialVersionUID = -1519002721084515784L;
    @XStreamAsAttribute
    private int number;
    @XStreamAsAttribute
    private String name;
    @XStreamAsAttribute
    private int size;
    @XStreamAsAttribute
    private String color;
    @XStreamAsAttribute
    private String colorname;
    @XStreamAsAttribute
    private int colorindex;
    @XStreamAsAttribute
    private boolean isCheck;
    @XStreamAsAttribute
    private int sizename;
    @XStreamAsAttribute
    private int sizeindex;
    @XStreamAsAttribute
    private int type;




    public UserBean(int number, String name, int size, String color, String colorname,int colorindex, boolean isCheck, int sizename) {
        super();
        this.number = number;
        this.name = name;
        this.type = AppConfig.STROKE_PEN;
        this.color = color;
        this.colorname = colorname;
        this.size = size;
        this.isCheck = isCheck;
        this.sizename = sizename;
        this.colorindex=colorindex;
    }
    public int getNumber() {
        return number;
    }
    public void setNumber(int number) {
        this.number = number;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getSize() {
        return size;
    }
    public void setSize(int size) {
        this.size = size;
    }
    public String getColor() {
        return color;
    }
    public void setColor(String color) {
        this.color = color;
    }
    public boolean isCheck() {
        return isCheck;
    }
    public void setCheck(boolean isCheck) {
        this.isCheck = isCheck;
    }
    public String getColorname() {
        return colorname;
    }
    public void setColorname(String colorname) {
        this.colorname = colorname;
    }
    public int getSizename() {
        return sizename;
    }
    public void setSizename(int sizename) {
        this.sizename = sizename;
    }
    public int getType() {
        return type;
    }
    public void setType(int type) {
        this.type = type;
    }
    public int getColorindex() {
        return colorindex;
    }
    public void setColorindex(int colorindex) {
        this.colorindex = colorindex;
    }
    @Override
    public String toString() {
        return "UserBean{" +
                "number=" + number +
                ", name='" + name + '\'' +
                ", size=" + size +
                ", color=" + color +
                ", colorname='" + colorname + '\'' +
                ", colorindex=" + colorindex +
                ", isCheck=" + isCheck +
                ", sizename=" + sizename +
                ", type=" + type +
                '}';
    }
    public int getColor(String colorname) {
        int color = 0;
        if (colorname.equals("赤")) {
            color = R.color.red_line;
        }
        if (colorname.equals("橙")) {
            color = R.color.orange_line;

        }
        if (colorname.equals("黄")) {
            color = R.color.yellow_line;

        }
        if (colorname.equals("绿")) {
            color = R.color.green_line;

        }
        if (colorname.equals("青")) {
            color = R.color.cyan_line;

        }
        if (colorname.equals("天蓝")) {
            color = R.color.sky_blue_line;

        }
        if (colorname.equals("蓝")) {
            color = R.color.blue_line;

        }
        if (colorname.equals("紫")) {
            color = R.color.puple_line;

        }
        return color;

    }


}
